package com.prjsystem.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.prjsystem.dao.BaseDao;
import com.prjsystem.dao.WorkRequestViewDao;
import com.prjsystem.entity.UserInfo;
import com.prjsystem.entity.WorkRequestDetail;
import com.prjsystem.entity.WorkRequestViewBean;

public class WorkRequestViewDaoImpl extends BaseDao implements WorkRequestViewDao{
	
	//一览按钮检索
	@SuppressWarnings("unchecked")
	public List<WorkRequestDetail> searchWr() {
		Map<String, String> params = new HashMap<String, String>();
		return excuteQueryForList("wrInfo.searchById",params);
	}
	
	//在一览界面进行模糊查询--WrId
	@SuppressWarnings("unchecked")
	public List<WorkRequestDetail> searchWrViewByWrid(WorkRequestViewBean workRequestViewBean) {
		return excuteQueryForList("wrInfo.searchById", workRequestViewBean);
	}
	
	//在一览界面进行查询--userName
	@SuppressWarnings("unchecked")
	public List<UserInfo> searchUserName() {
		return excuteQueryForstring("role.getAllUser");
	}
	
	//在一览界面点击Look按钮查看详细
	@SuppressWarnings("unchecked")
	public List<WorkRequestDetail> searchWrAllByWrid(WorkRequestViewBean workRequestViewBean) {
		return excuteQueryForList("wrInfo.getWrById", workRequestViewBean);
	}

	//删除按键
	public void deleteById(WorkRequestViewBean workRequestViewBean) {
		excuteDelete("wrInfo.delete", workRequestViewBean);
	}
	

}
